package com.pojo;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;

public class Dish {
    private Integer dId;

    @Pattern(regexp="(^[\u2E80-\u9FFF])"
            ,message="菜品名必须是中文")
    private String dName;

    @NotNull
    private BigDecimal price;

    private String picture;

    private Integer dtId;

    private String remark;

    private DishType dishType;

    public DishType getDishType() {
        return dishType;
    }

    public void setDishType(DishType dishType) {
        this.dishType = dishType;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getRemark() {
        return remark;
    }

    public Integer getdId() {
        return dId;
    }

    public void setdId(Integer dId) {
        this.dId = dId;
    }

    public String getdName() {
        return dName;
    }

    public void setdName(String dName) {
        this.dName = dName == null ? null : dName.trim();
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture == null ? null : picture.trim();
    }

    public Integer getDtId() {
        return dtId;
    }

    public void setDtId(Integer dtId) {
        this.dtId = dtId;
    }

    @Override
    public String toString() {
        return "Dish{" +
                "dId=" + dId +
                ", dName='" + dName + '\'' +
                ", price=" + price +
                ", picture='" + picture + '\'' +
                ", dtId=" + dtId +
                '}';
    }
}